package com.yst.spring.context;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringConfig {

    @Autowired
    ApplicationContext applicationContext;
    SpringConfig(){

    }

    @Bean
    SpringContext getSpringContext(){
        SpringContext context=new SpringContext();
        context.setApplicationContext(applicationContext);
        return context;
    }
}
